FROM java:8
VOLUME /tmp
ADD ./target/svca-service.jar /app.jar
RUN bash -c 'touch /app.jar'

ENV DOCKERIZE_VERSION v0.6.1
RUN wget http://maczouw:81/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
    && tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
    && rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz

EXPOSE 8080
ENTRYPOINT ["dockerize", "-timeout", "5m", "-wait", "http://user:password@config:8888/svca-service/default","java","-jar","/app.jar"]

